package com.dlut.service;

import com.dlut.dto.UserDto;
import com.dlut.pojo.Role;
import com.dlut.pojo.User;
import com.github.pagehelper.PageInfo;

import java.util.List;

public interface IUserService {

    List<User> query(User user) throws Exception;

    Integer addUser(User user) throws Exception;

    Integer updateUser(User user) throws Exception;

    Integer deleteUser(Integer id) throws Exception;

    Integer saveOrUpdate(UserDto dto) throws Exception ;

    User queryById(Integer userId) throws Exception ;

    List<Integer> queryUserRoles(Integer userId)throws Exception ;

    PageInfo<User> queryByPage(UserDto dto)throws Exception ;

    User login(String username);

    List<Role> queryUserHaveRole(User user)  throws Exception;

    List<User> queryUserByRoleName(String roleName)throws Exception;
}
